import requests
import os

cookies =  "CCSESSID=uu8jncjv10ojlf00mk6rc48v2v; WiseSessionId=99a168c3-d2d3-41e6-8b71-5db0a1c232ee; sidebarStatus=0; inputUser=8G5UaM1o%2FYIiLyVDbRQl8jQ4YzIyNjYzYjgzOTViODY1NzZlZTA3YTE4NjZkMGY4ZDEzZWY5YjFmYjM4MTMxZWFlNDM3YmNjZTE1NjEwMjX1VyqIbLybP1uNFU9IbPpc; cookiePhone=DKcdio7ggg2Ro0WIVHwCXDcyNDAyY2MzYWY4ZGY3NzJjZTA3YmYyZTJjYmMzN2Q1MDlhMTNiNWZiZGQ5ZTg3YTI3YzIyOWQ0MjU1YmUxMGRIxf60oYHS%2F%2FyUcWAhDCuF; ssoquery={%22token%22:%22a6e44dfefb983fe1dd5d8bbb4a8e7aded297e355%22%2C%22rdi%22:%22calendar%22%2C%22ssohost%22:%22cms.zjjtgc.com%22%2C%22ssoproto%22:%22https%22%2C%22appid%22:%22wedge_calendar%22%2C%22ssoprefix%22:%22sso%22}; Projmain-Token=902dbf7c-46df-4e4b-9074-f405cf2d1dda; SSOSessionId=2f66e4d0-e93c-4114-a0df-cf936f70f7b3; Admin-Token=admin-token"
wisetoken = "2f66e4d0-e93c-4114-a0df-cf936f70f7b3"
headers = {
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate, br, zstd",
        "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "Authorization": "2e40c396-ead0-4d39-86e2-c093128a3a47",
        "Cache-Control": "no-cache",
        "Connection": "keep-alive",
        "Content-Length": "2",
        "Content-Type": "application/json",
        "Cookie":cookies,
        "Host": "cms.zjjtgc.com",
        "Origin": "https://cms.zjjtgc.com",
        "Pragma": "no-cache",
        "Referer": "https://cms.zjjtgc.com/jg-web/jg-officeAuto/",
        "Sec-Fetch-Dest": "empty",
        "Sec-Fetch-Mode": "cors",
        "Sec-Fetch-Site": "same-origin",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0",
        "X-Requested-With": "XMLHttpRequest",
        "sec-ch-ua": "\"Chromium\";v=\"124\", \"Microsoft Edge\";v=\"124\", \"Not-A.Brand\";v=\"99\"",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "\"Windows\"",
        "wise-json": "1",
        "wise-token": wisetoken
    }

#获取所有文件列表
def get_all_files():
    url = "https://cms.zjjtgc.com/jg-api/wise-officeauto/vOa/findAll"
    payload = {
        "pageIndex": 1,
        "pageSize": 20
    }
    try:
        response = requests.post(url, headers=headers, json=payload)
        response.raise_for_status()
        print("请求成功，返回数据：", response.json())
    except requests.exceptions.RequestException as e:
        print("请求失败，请检查VPN连接。错误信息：", e)
    

get_all_files()

